Skip to content

fix: prevent directory nodes from appearing as ghost tabs (#1182)#1874

Open
moaaz-ae wants to merge 1 commit intosveltejs:mainfrom
moaaz-ae:fix/issue-1182
Open

fix: prevent directory nodes from appearing as ghost tabs (#1182)#1874
moaaz-ae wants to merge 1 commit intosveltejs:mainfrom
moaaz-ae:fix/issue-1182

Conversation

@moaaz-ae
Copy link
Copy Markdown
Contributor

Creating or renaming files with nested paths (e.g., src/lib/Button.svelte) caused non-functional ghost tabs to appear for each directory segment, and broke the Download App feature by attempting to read .contents from directory nodes. Fixed by adding a file_nodes getter to Workspace that filters to only File entries, and using it in ComponentSelector and Repl.toJSON() to prevent directories from surfacing in the UI or exports.

Fixes #1182

Before

before.mp4

After

Screencast.From.2026-03-18.15-22-44.mp4

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 18, 2026

@moaaz-ae is attempting to deploy a commit to the Svelte Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Editor: Adding a path to a filename creates ghost tabs

1 participant